<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" session="true"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<script type="text/javascript">
		function update(){
			$("#form").attr("action","/admin/member/memberUpdateOk.do");
			$("#form").submit();  
		}  
		  
		function goList(){
			$("#form").attr("action","/admin/member/memberList.do");
			$("#form").submit();    
		}  
</script>  
	
	<h2 class="sub-header">${title}</h2> 	
		<form class="form-horizontal" role="form" name="form" id="form" method="post">
		<input name="memberNo" id="memberNo" type="hidden" value="${memberDetail.memberNo}">
		  <div class="form-group"> 
		    <label for="inputEmail3" class="col-sm-2 control-label">아이디</label>
		    <div class="col-sm-10">
		      <input type="text" class="form-control" name="memberId" id="memberId" placeholder="아이디" value="${memberDetail.memberId }">
		    </div>  
		  </div>
		  <div class="form-group">
		    <label for="inputPassword3" class="col-sm-2 control-label">비밀번호</label>
		    <div class="col-sm-10">
		      <input type="password" class="form-control" name="passwd"  id="passwd" placeholder="비밀번호" value="${memberDetail.passwd }">
		    </div>
		  </div>
		  <div class="form-group">
		    <label for="inputPassword3" class="col-sm-2 control-label">이름</label>
		    <div class="col-sm-10">
		      <input type="text" class="form-control" name="memberNm"  id="memberNm" placeholder="이름" value="${memberDetail.memberNm }">
		    </div>
		  </div>
		  <div class="form-group">
		    <label for="inputPassword3" class="col-sm-2 control-label">핸드폰</label>
		    <div class="col-sm-10">
		      <input type="text" class="form-control" name="hpNum"  id="hpNum" placeholder="핸드폰" value="${memberDetail.hpNum }">
		    </div>
		  </div>
		  <div class="form-group">
		    <label for="inputPassword3" class="col-sm-2 control-label" >성별</label>
		    <div class="col-sm-10">
		      	<div class="radio">
				  <label>
				    <input type="radio" name="sex" id="sex" value="M" checked>
				    남자
				  </label>
				</div>
				<div class="radio">
				  <label>
				    <input type="radio" name="sex" id="sex" value="F" <c:if test="${memberDetail.sex eq 'F' }">checked="checked"</c:if>>
				    여자
				  </label>
				</div>
		    </div>
		  </div>
		  <div class="form-group">
		    <label for="inputPassword3" class="col-sm-2 control-label">이메일</label>
		    <div class="col-sm-10">
		      <input type="text" class="form-control" name="email" id="email" placeholder="이메일" value="${memberDetail.email }">
		    </div>
		  </div>
		  <div class="form-group">
		    <label for="inputPassword3" class="col-sm-2 control-label">생일</label>
		    <div class="col-sm-10">
		      <input type="text" class="form-control" name="birth" id="birth" placeholder="생일" value="${memberDetail.birth }">
		    </div>
		  </div>	
		  <div class="form-group">
		    <label for="inputPassword3" class="col-sm-2 control-label">등급</label>
		    <div class="col-sm-10">
		      <select class="form-control" name="grade" id="grade"> 
				  <option value="A" <c:if test="${memberDetail.grade eq 'A' }">selected="selected"</c:if>>관리자</option>
				  <option value="B" <c:if test="${memberDetail.grade eq 'B' }">selected="selected"</c:if>>일반회원</option>
			  </select>
		    </div>
		  </div>		  
		  <div class="form-group">
		    <div class="col-sm-offset-2 col-sm-10">  
		     	<a class="btn btn-default" href="#" onClick="update()">등록</a>
		     	<a class="btn btn-default" href="#" onClick="goList()">목록</a>
		    </div>
		  </div>
		</form>